﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QuanLyDiem
{
    public partial class frmAbout : Form
    {
        private static frmAbout frm = null;

        private frmAbout()
        {
            InitializeComponent();
        }

        public static frmAbout Create()
        {
            if (frm == null)
            {
                frm = new frmAbout();
                return frm;
            }
            return frm;
        }

        private void CloseForm(Control control)
        {
            foreach (Control item in control.Controls)
            {
                item.Click += new EventHandler(item_Click);
                if (item.Controls.Count > 0)
                {
                    CloseForm(item);
                }
            }
        }

        private void item_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void About_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void About_FormClosing(object sender, FormClosingEventArgs e)
        {
            frm.Dispose();
            frm = null;
        }

        private void frmAbout_Load(object sender, EventArgs e)
        {
            this.CloseForm(this);
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void label6_Click(object sender, EventArgs e)
        {

        }
    }
}
